

uniform float time;
uniform sampler2D gradtexture;

varying vec4 vertex;
	
void main()
{
	vec3 lightDir = normalize(vec3(gl_LightSource[0].position));
	
	vec4 outVert;				// used to hold results of vertex calcs
	vec4 curVert = gl_Vertex;	// used to hold the current vertex we're on
	outVert = curVert;
	outVert.z = sin(outVert.x + outVert.y + time)*0.3;	
	// set the texture coordinate to keep the texture on the model
	vertex = outVert;
	
	// set the vertex position
	// we're changing the vertex position so instead of gl_ModelViewProjectionMatrix * gl_Vertex (ftransform()) we use the new vertex position
	gl_Position = vec4(gl_ModelViewProjectionMatrix * outVert);

}
